"use strict";

/**
 * @ngdoc directive
 * @name jgappApp.directive:checkuserDefine
 * @description
 * # checkuserDefine
 */
angular.module("jgappApp").directive("invoiceDetail", function () {
  return {
    scope: {
      value: "=value"
    },
    restrict: "AE",
    templateUrl: "views/finance/invoicedetail.html",
    replace: true,
    link: function postLink(scope, element, attrs) {
      scope.details = []
      // 如果是审批页面只做展示
      scope.$watch("value", function (newValue, oldValue) {
        if (newValue) {
          scope.details = JSON.parse(newValue)
        }
      });
    }
  };
});
